package org.cashbook.IO.dataManager;

import java.util.Map;

import org.cashbook.core.objects.account.IAccount;
import org.cashbook.core.objects.category.ICategory;
import org.cashbook.core.objects.keyword.IKeyword;
import org.cashbook.core.objects.transaction.TransactionList;
import org.cashbook.entities.IUser;

public interface IDataManager {
	
	public TransactionList readTransactionsFromBuffer(String month, Integer year);
	
	public Map<String, ICategory> readSubCategoriesFromBuffer();
	
	public Map<String, ICategory> readCategoriesFromBuffer();
	
	public Map<String, IKeyword> readKeywordsFromBuffer();
	
	public Map<String, IAccount> readAccountsFromBuffer();
	
	public Map<String, IUser> readUsersFromBuffer();
	
	public void writeTransactionsToBuffer(TransactionList transactions, String month, int year);
	
	public void writeCategoryToBuffer(Map<String, ICategory> categories);
	
	public void writeSubCategoryToBuffer(Map<String, ICategory> subCategories);
	
	public void writeKeywordToBuffer(Map<String, IKeyword> keywords);
	
	public void writeAccountToBuffer(Map<String, IAccount> accounts);
	
	public void writeUsersToBuffer(Map<String, IUser> users);
	
	public void saveDataToDB();
	
	public boolean checkAllBuffered();
	
	public String getDataManagerType();

}
